<!doctype html>
<html lang="en">
<#include "../common/header.ftl">
<body>

<div id="wrapper" class="toggled">
<#include "../common/nav.ftl">
    <div class="container-fluid">
        <div class="row clearfix">
            <div class="col-md-4 column" style="margin-top: 100px">
                <table class="table table-bordered ">
                    <thead>
                    <tr>
                        <th>
                            订单ID
                        </th>
                        <th>
                            订单总金额
                        </th>

                    </tr>
                    </thead>
                    <tbody>

                    <tr class="success">
                        <td>
                        ${orderDto.orderId}
                        </td>
                        <td>
                        ${orderDto.orderAmount}
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="col-md-12 column">
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>
                            商品ID
                        </th>
                        <th>
                            商品名称
                        </th>
                        <th>
                            价格
                        </th>
                        <th>
                            数量
                        </th>
                        <th>
                            总额
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <#list orderDto.orderDetailList as orderDetail>
                    <tr class="info">
                        <td>
                        ${orderDetail.productId}
                        </td>
                        <td>
                        ${orderDetail.productName}
                        </td>
                        <td>
                        ${orderDetail.productPrice}
                        </td>
                        <td>
                        ${orderDetail.productQuantity}
                        </td>
                        <td>
                        ${orderDetail.productQuantity * orderDetail.productPrice}
                        </td>
                    </tr>
                    </#list>
                    </tbody>
                </table>
            </div>

        <#if orderDto.getOrderstatusenum().getMsg() =="新订单">
            <div class="col-md-12 column">
                <a type="button" class="btn btn-primary btn-default" onclick="
                        if(window.confirm('确定完结订单?')){
                        window.location.href = '/sell/seller/order/finish?orderId=${orderDto.orderId}'
                        }">完结订单</a>
                <a type="button" class="btn btn-default btn-danger"
                   onclick="
                           if(window.confirm('确定取消订单?')){
                           window.location.href = '/sell/seller/order/cancel?orderId=${orderDto.orderId}'
                           }">取消订单
                </a>
            </div>
        </#if>
        </div>
    </div>
</div>
</body>

</html>